<?php

declare(strict_types=1);
/**
 * This file is part of Hyperf.
 *
 * @link     https://www.hyperf.io
 * @document https://hyperf.wiki
 * @contact  group@hyperf.io
 * @license  https://github.com/hyperf/hyperf/blob/master/LICENSE
 */

namespace App\Controller;

use App\JsonRpc\DeliveryServiceInterface;
use App\JsonRpc\GoodsServiceInterface;
use Hyperf\Di\Annotation\Inject;

class IndexController extends AbstractController
{
    #[Inject]
    protected DeliveryServiceInterface $deliveryService;

    #[Inject]
    protected GoodsServiceInterface $goodsService;

    public function index()
    {
        $user = $this->request->input('user', 'Hyperf');
        $method = $this->request->getMethod();


        return [
            'data' => [
                'delivery' => $this->deliveryService->fahuo(['aaa' => 'bbbbb']),
                'goods' => $this->goodsService->jiankucun(10)
            ]
        ];
    }
}
